package xuegao.study.mall.repo.dao.ums;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import xuegao.study.mall.common.model.ums.UmsAdmin;
import xuegao.study.mall.common.model.ums.UmsAdminRoleRelation;

import java.util.List;
import java.util.Map;

public interface UmsAdminDao extends BaseMapper<UmsAdmin> {
    List<UmsAdmin> selectList(Map<String, Object> params);

    UmsAdmin getAdminByUsername(@Param("username") String username);

    int insertAdmin(UmsAdmin umsAdmin);

    int updateAdmin(UmsAdmin umsAdmin);

    int deleteById(@Param("id") Long id);

    int deleteAdminRoleRelationByAdminId(@Param("adminId") Long adminId);

    int batchInsertUmsAdminRoleRelation(@Param("list") List<UmsAdminRoleRelation> list);
}
